README – Replication Code for Pantaleão (2025), APSR: “Peace Dividends”

Author: Bruno Pantaleão
Paper: Pantaleão (2025), American Political Science Review
Purpose: This replication package reproduces all figures and tables reported in the article Peace Dividends.

1. Software Requirements
Stata Version: 14 or higher
Packages: reghdfe, csdid, csdid2


2. Data Files

The following .dta files are required in the Replication package folder:

homicides_sp.dta – Homicide data for São Paulo

pcc_expansion_aps.dta – PCC territorial expansion data

data_jobs_firms.dta – Employment and firm registry data

night_lights.dta – Nighttime light intensity data

census_data.dta – 2000 census indicators


3. Output Overview

The replication produces:

Figures:

Figure 1 – Homicide reduction over time (homicides_sp.dta)

Figure 2 – PCC expansion in the sample (pcc_expansion_aps.dta)

Figure 3 – Map of APs (produced externally in QGIS)

Figure 4 – Event-study: job creation post-PCC entry

Figure 5 – Event-study: firm openings post-PCC entry

Figure 6 – Event-study: nighttime luminosity post-PCC entry

Figure 7 – Coefficients by years of PCC presence

Figure 8 – Regression of PCC entry on infrastructure conditions

Figure 9 – Regression of PCC entry on social conditions

Tables:

Table 1 – Descriptive statistics (GeoSampa 2016 data)

Table 2 – Simple DiD estimates (Callaway et al., 2021 method)

Table 3 – drDiD estimates (Callaway et al., 2021 method)


4. Running the Code

Open Stata and set the working directory to the replication package folder:
cd "path/to/Replication package"
Ensure required packages are installed (see Section 1).

Run the .do file in sequence to generate all figures and tables.

Outputs will be saved in the Production/ folder in .pdf format (for figures).

Some outputs (Tables 2 & 3) require manual copy-paste into Excel/Word for formatting due to outreg2 compatibility issues.


5. Notes

Figure 3 is produced externally in QGIS and included as a static PDF in the package.

The graph play commands rely on saved graph schemes (csdid_red_blue, coefplot_anostrat) — ensure these are in your Stata graph scheme directory.

Code blocks for Tables 2 and 3 intentionally stop before table formatting; authors formatted them manually for publication.

All estimates using csdid2 follow Callaway & Sant’Anna (2021) methodology for staggered adoption treatment effects.


6. References

Callaway, B., & Sant’Anna, P. H. C. (2021). “Difference-in-Differences with Multiple Time Periods.” Journal of Econometrics, 225(2), 200–230.

GeoSampa (2016). Municipal geospatial and statistical data.